<?php
namespace Common\Model\Ai;
use Think\Model;

class AiTaskModel extends Model{
	const STATUS_WAITTING = 'waitting';
	const STATUS_RUNNING = 'running';
	const STATUS_FAILED = 'failed';
	const STATUS_SUCCESS = 'success';

	const STATUS_MAPS = [
		self::STATUS_WAITTING => '等待中',
        self::STATUS_RUNNING => '运行中',
        self::STATUS_FAILED => '失败',
        self::STATUS_SUCCESS => '成功'
	];

	const PLATFORM_COZE = 'coze';

	protected $tableName = 'ai_task';

	public static function generateTaskId($platform = self::PLATFORM_COZE){
		$taskId = sprintf('%s-%s',$platform,generate_random_string(12).random_int(1,99999));
		return $taskId;
	}

}

?>
